failat 21

if not exists XEN-Icons
  echo "*n Please change current directory to that of MagicWB *n or start the installation from the Workbench!*n"
  quit
endif

echo "*n*e[1;32m _____________________________________________________________________"
echo " *e[43m                                                                     *e[0m"
echo " *e[0;32;43m             Welcome to MagicWB v1.2p: RAM-Icon SNAPSHOT*e[1m             *e[0m"
echo " *e[1;4;43m                                                                     *e[0m"
echo "*n*n This script should be started AFTER the main installation of *e[32mMagicWB*e[0m!"
echo "*n If you do not like the position of the RAM-Icon on your Workbench you" 
echo " could obviously drag the Icon to your desired position and select the"
echo " function `Icons/Snapshot' from the Workbench menu. But the next time"
echo " when you reboot your system you'll find the RAM-Icon NOT at your"
echo " previous snapshot-position!"
echo "*n Well, this script provides the solution for all of you who do not"
echo " exactly know how to preserve the snapshot-position even after a"
echo " reboot:"
echo "*E[32m*n Just drag the RAM-Icon to your desired position, then snapshot the"
echo " Icon with the function `Icons/Snapshot' from the Workbench menu and"
echo " finally start this script with 'yes' or 'y'.*e[0m"
echo noline "*n Start the RAM-Icon snapshot? "

set > nil: InpVar ?

if $InpVar eq "ja"
  skip Start
endif

if $InpVar eq "j"
  skip Start
endif

if $InpVar eq "y"
  skip Start
endif

if $InpVar eq "yes"
  skip Start
endif

echo noline "*n*e[32m Snapshot aborted."
quit

lab Start

if exists SYS:S/RAM.info
  copy > NIL: RAM:Disk.info TO SYS:S/RAM.info
  if warn
    echo "*n*e[32m Snapshot failed!"
    skip end
  endif
  echo "*e[32m*n RAM-Icon snapshot successfully finished!"
else
  echo "*e[1;1H*e[J"  
  echo "*n*n*N I could not find `RAM.info' in your S: directory! You probably"
  echo " did not install *e[32mMagicWB*e[0m with the INSTALLER that was provided"
  echo " with the package. Therefore the `Copy RAM-Icon' line could not"
  echo " be added to the `User-Startup' and the RAM-Icon is not located"
  echo " in the right place!"
  echo "*n Unfortunately you have installed *e[32mMagicWB*e[0m manually thus having"
  echo " wasted more time than would have been necessary if you had" 
  echo " wisely used the Installer!" 
  echo "*n Paradoxically enough you are using this script at the moment"
  echo " which you really do not need if you have had the ability to"
  echo " install *e[32mMagicWB*e[0m by yourself! Bye..."
  echo "*n*n     [Return]"
  set > nil: Return ?
  skip end
endif

wait 2
lab end
quit
